home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / snmp / mib2c-data / generic-table-oids.m2c < prev    next >
Encoding:
Text File  |  2011-01-05  |  3.6 KB  |  114 lines

  1. #############################################################  -*- c -*-
  2. ## generic include for XXX. Do not use directly.
  3. ##
  4. ## $Id: generic-table-oids.m2c 17548 2009-04-23 16:35:18Z hardaker $
  5. ########################################################################
  6. @if $m2c_create_fewer_files != 1@
  7. @eval $hack = "Id"@
  8. @eval $m2c_save = "$name"@
  9. @eval $name = "${m2c_save}_oids"@
  10. @open ${name}.h@
  11. /*
  12.  * Note: this file originally auto-generated by mib2c using
  13.  *  $Id: generic-table-oids.m2c 17548 2009-04-23 16:35:18Z hardaker $
  14.  *
  15.  * $$hack:$
  16.  */
  17. @include generic-header-top.m2i@
  18. @eval $name = "$m2c_save"@
  19. @end@ // m2c_create_fewer_files
  20. ########################################################################
  21. @if $m2c_mark_boundary == 1@
  22. /** START header generated by $RCSfile$ $Revision: 17548 $ */
  23. @end@
  24. ##
  25.  
  26. /* column number definitions for table $context */
  27. #define $context.uc_OID              $context.commaoid
  28.  
  29.     @eval $minv = 0xffffffff@
  30.     @eval $maxv = 0@
  31.     @eval $gto_flag_req = ""@
  32.     @eval $gto_flag_set = ""@
  33.     @eval $m2c_tmp_gto = 0@
  34.  
  35.     @foreach $node column@
  36. #define COLUMN_$node.uc         $node.subid
  37.         @if $node.accessible == 1@
  38.            @if ($node.settable == 1) || ($m2c_table_sparse == 1)@
  39. @             if "x$gto_flag_set" eq "x"@
  40. @               eval $gto_flag_set = "COLUMN_$node.uc_FLAG"@
  41. @             else@
  42. @               eval $gto_flag_set = "$gto_flag_set | COLUMN_$node.uc_FLAG"@
  43. @             end@
  44.               @if $m2c_tmp_gto > 31@
  45. #define COLUMN_$node.uc_FLAG    (((uint64_t)0x1) << $m2c_tmp_gto)
  46.               @else@
  47. #define COLUMN_$node.uc_FLAG    (0x1 << $m2c_tmp_gto)
  48.               @end@
  49.               @eval $m2c_tmp_gto = $m2c_tmp_gto + 1@
  50.            @end@
  51.            @if ($m2c_table_row_creation == 1) && ($node.settable == 1) && ("x$node.defval" eq "x")@
  52.               @if "x$gto_flag_req" eq "x"@
  53.                  @eval $gto_flag_req = "COLUMN_$node.uc_FLAG"@
  54.               @else@
  55.                  @eval $gto_flag_req = "$gto_flag_req | COLUMN_$node.uc_FLAG"@
  56.               @end@
  57.            @end@
  58.           @if $node.subid < $minv@
  59.              @eval $minv = $node.subid@
  60.              @eval $minn = "COLUMN_$node.uc"@
  61.           @end@
  62.           @if $node.subid > $maxv@
  63.              @eval $maxv = $node.subid@
  64.              @eval $maxn = "COLUMN_$node.uc"@
  65.           @end@
  66.         @end@
  67.     
  68.     @end@ # column
  69.  
  70. #define $context.uc_MIN_COL   $minn
  71. #define $context.uc_MAX_COL   $maxn
  72. ##
  73. ## column_set_flags and column_exist_flags are unsigned ints, to 32 is
  74. ## the limit. Could try something with a 'long long' to see if that
  75. ## can get us to 64, or do something like FD_SET, which would let us
  76. ## be pretty unlimited.
  77. ##
  78.     @if $maxn > 31@
  79.     @   print ERROR: more than 32 columns not supported yet.@
  80.     @   exit@
  81.     @end@
  82.     
  83.  
  84. @   if $m2c_table_settable@
  85.   @if "x$gto_flag_set" ne "x"@
  86.     /*
  87.      * TODO:405:r: Review $context.uc_SETTABLE_COLS macro.
  88.      * OR together all the writable cols.
  89.      */
  90. #define $context.uc_SETTABLE_COLS ($gto_flag_set)
  91.   @end@
  92.   @if $m2c_table_row_creation@
  93.     @if "x$gto_flag_req" ne "x"@
  94.     /*
  95.      * TODO:405:r: Review $context.uc_REQUIRED_COLS macro.
  96.      * OR together all the required rows for row creation.
  97.      * default is writable cols w/out defaults.
  98.      */
  99. #define $context.uc_REQUIRED_COLS ($gto_flag_req)
  100.     
  101.       @end@
  102.     @end@
  103. @   end@ # settable
  104. @if $m2c_create_fewer_files != 1@
  105. @eval $m2c_save = "$name"@
  106. @eval $name = "${m2c_save}_oids"@
  107. @include generic-header-bottom.m2i@
  108. @eval $name = "$m2c_save"@
  109. @end@
  110. ########################################################################
  111. @if $m2c_mark_boundary == 1@
  112. /** END header generated by $RCSfile$ $Revision: 17548 $ */
  113. @end@
  114.